<!--
 * @Author: Ylong
 * @Date: 2025-07-16 16:10:21
 * @LastEditTime: 2025-08-12 22:17:31
-->
<template>
  <div class="common-layout">
    <el-container>
      <el-header><HeaderBar /></el-header>
      <el-container>
        <el-aside width="200px"><MenuBar /></el-aside>
        <el-main><router-view /></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import HeaderBar from "./components/HeaderBar.vue";
import MenuBar from "./components/MenuBar.vue";
</script>

<style scoped lang="scss">
.common-layout {
  width: 100%;
  height: 100%;

  & > .el-container {
    height: 100%;

    .el-header {
      background-color: #fff;
      box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
      position: relative;
      z-index: 2;
    }

    .el-aside {
      background-color: #fff;
    }

    .el-container {
      height: calc(100% - 60px);
    }

    .el-main {
      height: 100%;
      padding: 16px;
      background-color: #f5f5f5;
      overflow: auto;

      > div {
        height: 100%;
        padding: 16px;
        background-color: #fff;
        border-radius: 4px;
      }
    }
  }
}
</style>
